#include "HowManyCond.h"

using namespace kc_sf;

// -------------------------------------------------------------- //

HowManyCond::HowManyCond()
: hmHowMany( 1 ),
  hmOperator( Ge )
{
}

// -------------------------------------------------------------- //

bool HowManyCond::evalHowMany( int how_many ) const
{
	return
		hmOperator == Eq ? how_many == hmHowMany
		: hmOperator == Ge ? how_many >= hmHowMany
		: hmOperator == Gt ? how_many > hmHowMany
		: hmOperator == Le ? how_many <= hmHowMany
		: hmOperator == Lt ? how_many < hmHowMany
		: hmOperator == Ne ? how_many != hmHowMany
		: how_many >= hmHowMany;
}
